{error->LoadErrorArray assign='errors' save=1}
{if !$errors}
	{if !$goto} {* goto gaunasmas kai sukuri puslapi, jis reikalingas tam, kad iskarto atidaryti sukurta puslapi *}
		<script language="javascript1.1" type="text/javascript"> 
		window.opener.location.reload();
		//alert('reload');
		window.close();
		</script>
	{else}
		<script language="javascript1.1" type="text/javascript"> 
		window.opener.location.href='index.php?admin=1&{$goto}';
		//alert('goto');
		window.close();
		</script>
	{/if}
{else}
<script language="javascript1.1" type="text/javascript">
window.location.href='{ext->decode_referer referer=$smarty.post.referer}';
</script>
{/if}
